/**
 * 
 */

/**
 * @author inaki_torres
 *
 */
public class Cadena {

	public int longitud(String cadena){
		return cadena.length();
	}
	public int vocales(String cadena){
		String vocales="aeiouAEIOU";
		int numvoc=0;
		for (int i =0; i<vocales.length();i++){
			for(int z=0;z<cadena.length();z++){
				if (vocales.charAt(i)==cadena.charAt(z)){
					numvoc++;
				}
			}
		}
		return numvoc;
	}
	public String invertir(String cadena){
		String invertido="";
		char carac;
		for (int i=cadena.length()-1;i>=0;i--){
			carac=cadena.charAt(i);
			invertido=invertido + carac;
		}
		return invertido;
	}
	public int contarLetra(String cadena, char caracter){
		int cont=0;
		for (int i=0;i<cadena.length();i++){
			if (cadena.charAt(i)==caracter){
				cont++;
			}
		}
		return cont;
	}
}
